<?php
defined('IN_PHPCMS') or exit('No permission resources.'); 
pc_base::load_app_class('admin', 'admin', 0);
class qd_admin extends admin {
	private $qd_db,$siteid;
	function __construct() {
		parent::__construct();
		$this->qd_db = pc_base::load_model('qd_model');
		$this->siteid = $this->get_siteid();
	}
	
	public function init() {
		// 获取当前天数
		$cur_day=date('d',time());
		$days = $this->qd_db->select("`member_id`=$this->siteid",days);
		$days_str = '';
		foreach ($days as $v) {
			$days_str .=$v['days'].',';
		}
		$days_str = substr($days_str, 0,-1);
	    $actived = stripos($days_str, $cur_day);



		include $this->admin_tpl('init');
	}


/**
	*签到
	*
	*@return void
	*author
	**/



	function add(){

		// echo 1;die;
        $_POST['member_id']=$this->siteid;

		echo $this->qd_db->insert($_POST);


	}
	

	

	
}